home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / reshape.z / reshape
Encoding:
Text File  |  2002-10-03  |  3.3 KB  |  80 lines

  1. RESHAPE(3I)                                           Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      RREESSHHAAPPEE - Constructs an array of a specified shape
  6.  
  7. SSYYNNOOPPSSIISS
  8.      RREESSHHAAPPEE (([SSOOUURRCCEE==]_s_o_u_r_c_e,, [SSHHAAPPEE==]_s_h_a_p_e [,,[PPAADD==]_p_a_d] [,,[OORRDDEERR==]_o_r_d_e_r]))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, IRIX systems
  12.  
  13.      CF90, MIPSpro 7 Fortran 90
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      Fortran
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      The RREESSHHAAPPEE intrinsic function constructs an array of a specified
  20.      shape from the elements of a given array.  It accepts the following
  21.      arguments:
  22.  
  23.      _s_o_u_r_c_e    May be of any type.  It must be array valued.  If _p_a_d is
  24.                absent or of size zero, the size of _s_o_u_r_c_e must be greater
  25.                than or equal to PPRROODDUUCCTT(_s_h_a_p_e).  The size of the result is
  26.                the product of the values of the elements of _s_h_a_p_e.
  27.  
  28.      _s_h_a_p_e     Must be an integer, of rank one, and of constant size.  Its
  29.                size must be positive and less than 8.  It must not have an
  30.                element whose value is negative.
  31.  
  32.      _p_a_d       Must be of the same type as _s_o_u_r_c_e.  It must be array
  33.                valued.
  34.  
  35.      _o_r_d_e_r     Must be of type integer.  It must have the same shape as
  36.                _s_h_a_p_e, and its value must be a permutation of (1,2,...,_n),
  37.                where _n is the size of _s_h_a_p_e.  If absent, the default order
  38.                is (1,2,...,_n).
  39.  
  40.      RREESSHHAAPPEE is a transformational function.  The name of this intrinsic
  41.      cannot be passed as an argument.
  42.  
  43. RREETTUURRNN VVAALLUUEESS
  44.      The type of the result is the same type as _s_o_u_r_c_e.  The result is an
  45.      array of shape _s_h_a_p_e, that is, SSHHAAPPEE((RREESSHHAAPPEE((_s_o_u_r_c_e,,_s_h_a_p_e,,_p_a_d,,_o_r_d_e_r))))
  46.      is equal to _s_h_a_p_e.
  47.  
  48.      The elements of the result, taken in permuted subscript order
  49.      _o_r_d_e_r(1), ..., _o_r_d_e_r(_n), are those of _s_o_u_r_c_e in normal array element
  50.      order followed, if necessary, by those of _p_a_d in array element order,
  51.      followed, if necessary, by additional copies of _p_a_d in array element
  52.      order.
  53.  
  54. EEXXAAMMPPLLEESS
  55.      Example 1:  RREESSHHAAPPEE((((//11,,22,,33,,44,,55,,66//)),, ((//22,,33//)))) has the following value:
  56.  
  57.         | 1 3 5 |
  58.  
  59.         | 2 4 6 |
  60.  
  61.      Example 2:  RREESSHHAAPPEE((((//11,,22,,33,,44,,55,,66,,77,,88,,99//)),, ((//33,,44//)),, ((//00,,00//)))) has the
  62.      following value:
  63.  
  64.         | 1 4 7 0 |
  65.  
  66.         | 2 5 8 0 |
  67.  
  68.         | 3 6 9 0 |
  69.  
  70.      Example 3:  RREESSHHAAPPEE((((//11,,22,,33,,44,,55,,66//)),, ((//22,,44//)),, ((//00,,00//)),, ((//22,,11//)))) has
  71.      the following value:
  72.  
  73.         | 1 2 3 4 |
  74.  
  75.         | 5 6 0 0 |
  76.  
  77. SSEEEE AALLSSOO
  78.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  79.      man page.
  80.